package com.packenius.library.xspdf;

import java.util.Map;

/**
 * @author Christian Packenius, 2013.
 */
abstract class XSAlternativeFontEncoding {
  abstract String getPdfDifferencesListContent();

  abstract String getID();

  abstract Map<Character, Character> getCharacterEncodingMap();

  /**
   * @see java.lang.Object#equals(java.lang.Object)
   */
  @Override
  public boolean equals(Object o) {
    if (o == null || !(o instanceof XSAlternativeFontEncoding)) {
      return false;
    }

    XSAlternativeFontEncoding alt = (XSAlternativeFontEncoding) o;

    if (!getPdfDifferencesListContent().equals(alt.getPdfDifferencesListContent())) {
      return false;
    }
    if (!getID().equals(alt.getID())) {
      return false;
    }

    return true;
  }
}
